import os
from dotenv import load_dotenv

# 加载环境变量
load_dotenv()

class Config:
    SECRET_KEY = os.environ.get('SECRET_KEY') or 'dev-secret-key'
    
    # 文件存储配置
    UPLOAD_FOLDER = os.path.join(os.path.dirname(__file__), '../uploads')
    #PROCESSED_FOLDER = os.path.join(os.path.dirname(__file__), '../processed')
    PROCESSED_FOLDER = '/home/yanyaofeng/video-processing-app/processed'
    ALLOWED_EXTENSIONS = {'mp4', 'mov', 'avi', 'mkv'}
    MAX_CONTENT_LENGTH = 500 * 1024 * 1024  # 500MB
    print(f"Processed files directory: {PROCESSED_FOLDER}")  # 启动时会打印路径


    # Celery配置
    CELERY_BROKER_URL = 'redis://localhost:6379/0'
    CELERY_RESULT_BACKEND = 'redis://localhost:6379/0'
  
    # 新增新版配置名
    broker_url = CELERY_BROKER_URL  # 新格式别名
    result_backend = CELERY_RESULT_BACKEND  # 新格式别名
